package com.aaa.system.mapper;

import com.aaa.entity.Role;
import com.aaa.entity.RoleMenu;
import com.aaa.entity.RoleUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface RoleMapper extends BaseMapper<Role> {
    List<Role> selectByUserId(Long userId);

    void deleteByUserId(Long userId);

    void batchInsert(@Param("userId") Long userId,@Param("roleIds") Long[] roleIds);

    List<RoleUser> selectRoleIdByUserId(@Param("userId") Long userId);

    List<RoleUser> selectRoleIdByUserIds(@Param("userIds") Long[] userIds);

    List<RoleMenu> selectMenuByRoleId(Long roleId);

    void updRUByRoleId(Long roleId);

    List<RoleMenu> selectRM(Long[] roleIds);

    void updRoleDelFlag(Long[] roleIds);

    int delRMRole(Long[] roleIds);
}
